<template>
  <div>
    <navigation-bar>
      <div class="searchContent">&nbsp;</div>
    </navigation-bar>
    <table-index
      :dataSource="dataSource"
      :tableColumns="tableColumns"
      btnListWidth="80"
      :height="curHeight"
    ></table-index>
  </div>
</template>

<script>
import tableIndex from "@/components/customComponents/customeTable/tableNoHeight";
import navigationBar from "@/components/customComponents/managementCenter/navigationBar";
import { AjaxCommon } from "@/libs/apiCommon";
import { PopupCommon } from "@/libs/popupCommon";
export default {
  components: {
    navigationBar,
    tableIndex,
  },
  data() {
    return {
      // table 相关参数  begin
      curHeight: document.body.clientHeight - 140,
      dataSource: [],
      tableColumns: [
        {
          prop: "name",
          label: "姓名",
        },
        {
          prop: "count",
          label: "上传族数量",
        },
      ],
    };
  },
  methods: {
    // 初始化事件
    initPage() {
      let self = this;
      AjaxCommon(`api/familyresouce/GetUploadCountByUser`, "get", null).then(
        (res) => {
          console.log(res, "res......");
          if (res.data.status == 200) {
            self.dataSource = res.data.response;
          } else {
            PopupCommon.notify("error", res.data.message);
          }
        }
      );
    },
  },
  mounted() {
    this.$nextTick(() => {
      this.initPage();
    });
  },
};
</script>

<style>
.singleTable {
  margin-bottom: 20px;
}
.singleBtn {
  position: absolute;
  bottom: 8px;
  right: 9px;
}
</style>
